<?php
include_once '../config/db-cred.inc.php';

$login="member";
$password="660497";

//  http://service.local/amember/api/check-access/by-login-pass?_key=eGlQnJUOZMaSaeo1Waq2&login=member&pass=660497
$url = "http://$servicename/amember/api/check-access/by-login-pass?_key=$APIKEY&login=$login&pass=$password";
    

$c = curl_init($url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec($c);
curl_close($c);

$result = json_decode($page, true);

if ($result['ok']===true){
    echo "good";
}else{
    echo "bad user";
}

print_r($result);


?>
